/*
 * @Descripttion: GGB
 * @version: 1.0
 * @Author: GGB
 * @Date: 2021-08-22 11:17:12
 * @LastEditors: GGB
 * @LastEditTime: 2021-08-22 11:45:27
 */
class VisitorModel {
  int total;
  List<Visitor> visitor;

  VisitorModel({this.total, this.visitor});

  VisitorModel.fromJson(Map<String, dynamic> json) {
    total = json['total'];
    if (json['visitor'] != null) {
      visitor = new List<Visitor>();
      json['visitor'].forEach((v) {
        visitor.add(new Visitor.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['total'] = this.total;
    if (this.visitor != null) {
      data['visitor'] = this.visitor.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class Visitor {
  String name;
  String time;
  String avatar;
  String status;
  String desc;

  Visitor({this.name, this.time, this.avatar, this.status, this.desc});

  Visitor.fromJson(Map<String, dynamic> json) {
    name = json['name'];
    time = json['time'];
    avatar = json['avatar'];
    status = json['status'];
    desc = json['desc'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['name'] = this.name;
    data['time'] = this.time;
    data['avatar'] = this.avatar;
    data['status'] = this.status;
    data['desc'] = this.desc;
    return data;
  }
}
